import http from "@/utils/http/hub";

/**
 * 酒店服务宣传页
 */
export const hotelWelcome = (
  params,
  config = {
    custom: {
      auth: false,
      loading: false,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelLeaflets`,
    params,
    config,
  });
};

/**
 * 酒店服务首页
 */
export const hotelIndex = (
  params,
  config = {
    custom: {
      auth: true,
      loading: false,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelService`,
    params,
    config,
  });
};

/**
 * 酒店列表
 */
export const hotelList = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelList`,
    params,
    config,
  });
};

/**
 * 获取酒店详情
 */
export const getHotelDetail = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelDetail`,
    params,
    config,
  });
};

/**
 * 创建酒店
 */
export const hotelCreate = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelCreate`,
    params,
    config,
  });
};

/**
 * 修改酒店
 */
export const hotelUpdate = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelUpdate`,
    params,
    config,
  });
};

/**
 * 删除酒店
 * hotelIds : 酒店ID 多个用逗号连接
 */
export const hotelDel = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelDel`,
    params,
    config,
  });
};

/**
 * 资质审核
 */
export const hotelExamine = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/qualificationsCreate`,
    params,
    config,
  });
};

/**
 * 查看资质
 */
export const examineDetail = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/qualificationsDetail`,
    params,
    config,
  });
};

/**
 * 创建房间
 */
export const hotelRoomCreate = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelRoomCreate`,
    params,
    config,
  });
};

/**
 * 编辑房间
 */
export const hotelRoomUpdate = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelRoomUpdate`,
    params,
    config,
  });
};

/**
 * 获取房间详情
 */
export const getHotelRoomDetail = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelRoomDetail`,
    params,
    config,
  });
};

/**
 * 批量删除房间
 * hotelRoomIds : 酒店房间ID 多个用逗号连接
 */
export const hotelRoomDel = (
  params,
  config = {
    custom: {
      auth: true,
      loading: true,
    },
  }
) => {
  return http.post({
    url: `/hotel/hotelRoomDel`,
    params,
    config,
  });
};
